home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Utilities / AmiBroker / AFL / Commentaries / RSI.afl < prev   
Text File  |  1999-06-10  |  4KB  |  69 lines

  1. /* File:          RSI Guru Commentary
  2. ** Requirements:  AmiBroker 3.0 (AFL 1.1)
  3. ** Last Modified: TJ, Mar 22nd, 1999 
  4. */
  5.  
  6. "Review of " + name() +" as of "+date();
  7.  
  8. vrsi = rsi( 14 );
  9.  
  10. buy = cross( vrsi, 30 );
  11. sell = cross( 70, vrsi );
  12.  
  13. "\nThe current value for the 14 day RSI is " + WriteVal( vrsi );
  14.  
  15. "\nThe RSI, written by J. Welles Wilder in 1978, can be used in several different ways to analyze a chart.\n";
  16.  
  17. "Tops and Bottoms";
  18. "================\n";
  19.  
  20. WriteIf( vrsi > 70, "The RSI is above 70.  This is where it usually tops.  The RSI usually forms tops and bottoms before the underlying security.",
  21. WriteIf( vrsi < 30, "The RSI is below 30.  This is where it usually bottoms.  The RSI usually forms tops and bottoms before the underlying security.",
  22. "The RSI is not currently in a topping (above 70) or bottoming (below 30) range. " 
  23. + WriteIf( cross( 70, vrsi ), "However, the RSI just crossed below 70 from a topping formation.  This is a bearish sign.",
  24. WriteIf( cross( vrsi, 30 ), "However, the RSI just crossed above 30 from a bottoming formation.  This is a bullish sign.", "" ) ) ) ); 
  25.  
  26. bars30 = BarsSince( buy );
  27. bars70 = BarsSince( sell );
  28.  
  29. "\nBuy/Sell signals";
  30.   "================\n";
  31.  
  32. "A buy or sell signal is generated when the RSI moves out of an overbought/oversold area. \nThe last signal was a "+
  33. WriteIf( bars30 < bars70, "buy", WriteIf( bars30 > bars70, "sell", "" ))+
  34. WriteVal( min( bars30, bars70 ), 3.0 ) + " period(s) ago.";
  35.  
  36. "\nChart Formations";
  37.   "================\n";
  38.  
  39. "The RSI often forms chart patterns (such as head and shoulders or rising wedges) that may or may not be visible on the price chart.  "+
  40. "Since the analysis of chart patterns is subjective, the Guru Advisor cannot find them.  You will have to visually inspect the RSI indicator to look for such patterns.";
  41.  
  42. "\nFailure Swings (also known as support or resistance penetrations or breakouts";
  43.   "=============================================================================\n";
  44.  
  45. WriteIf( vrsi >= hhv( vrsi, 14 ), "The RSI has just reached its highest value in the last 14 period(s).  This is bullish.",
  46. WriteIf( vrsi <= llv( vrsi, 14 ), "The RSI has just reached its lowest value in the last 14 period(s).  This is bearish.",
  47. "The RSI does not currently show any Failure Swings." ) );
  48.  
  49. "\nSupport and Resistance";
  50.   "======================\n";
  51. "The RSI shows, sometimes more clearly than the price chart, levels of support and resistance."+
  52. "As with chart formations, this is subjective, so you must visually inspect the chart to determine this.";
  53.  
  54. "\nDivergence";
  55.   "==========\n";
  56.  
  57. WriteIf( close >= hhv( close, 14 ) and vrsi < hhv( vrsi, 14 ), 
  58. "The security price has set a new 14-day high while the RSI has not.  This is a bearish divergence.",
  59. WriteIf( vrsi >= hhv( vrsi, 14 ) and close < hhv( close, 14 ), 
  60. "The RSI has set a new 14-day high while the security price has not.  This is a bullish divergence.",
  61. WriteIf( close <= llv( close, 14 ) and vrsi > llv( vrsi, 14 ), 
  62. "The security price has set a new 14-day low while the RSI has not.  This is a bullish divergence.",
  63. WriteIf( vrsi <= llv( vrsi, 14) and close > llv(close,14), 
  64. "The RSI has set a new 14-day low while the security price has not.  This is a bearish divergence.",
  65. "The RSI and price are not diverging." ) ) ) ); 
  66.  
  67. "\n\nThis commentary is not a recommendation to buy or sell, but rather a guideline to interpreting the specified indicators.  
  68. The author accepts no liability whatsoever for any loss arising from any use of this expert or its contents.";
  69.